Protocols by Default - Safe MPI Code Generation Based on Session Types
نویسندگان
چکیده
This paper presents a code generation framework for type-safe and deadlock-free Message Passing Interface (MPI) programs. The code generation process starts with the definition of the global topology using a protocol specification language based on parameterised multiparty session types (MPST). An MPI parallel program backbone is automatically generated from the global specification. The backbone code can then be merged with the sequential code describing the application behaviour, resulting in a complete MPI program. This merging process is fully automated through the use of an aspect-oriented compilation approach. In this way, programmers only need to supply the intended communication protocol and provide sequential code to automatically obtain parallelised programs that are guaranteed free from communication mismatch, type errors or deadlocks. The code generation framework also integrates an optimisation method that overlaps communication and computation, and can derive not only representative parallel programs with common parallel patterns (such as ring and stencil), but also distributed applications from any MPST protocols. We show that our tool generates efficient and scalable MPI applications, and improves productivity of programmers. For instance, our benchmarks involving representative parallel and applicationspecific patterns speed up sequential execution by up to 31 times and reduce programming effort by an average of 39%.
منابع مشابه
Scalable Session Programming for Heterogeneous High-Performance Systems
This paper introduces a programming framework based on the theory of session types for safe and scalable parallel designs. Sessionbased languages can offer a clear and tractable framework to describe communications between parallel components and guarantee communicationsafety and deadlock-freedom by compile-time type checking and parallel MPI code generation. Many representative communication t...
متن کاملTowards deductive verification of MPI programs against session types
The Message Passing Interface (MPI) is the de facto standard message-passing infrastructure for developing parallel applications. Two decades after the first version of the library specification, MPI-based applications are nowadays routinely deployed on super and cluster computers. These applications, written in C or Fortran, exhibit intricate message passing behaviours, making it hard to stati...
متن کاملTwo Session Typing Systems for Higher-Order Mobile Processes
This paper proposes two typing systems for session interactions in higherorder mobile processes. Session types for the HOπ-calculus capture high-level structures of communication protocols and code mobility as type abstraction, and can be used to statically check the safe and consistent process composition in communication-centric distributed software. Integration of arbitrary higher-order code...
متن کاملSpecification and Verification of Protocols for MPI Programs
We present an approach for the validation of Message Passing Interface (MPI) programs. The aim is to type-check programs against session-type based protocol specifications, enforcing properties such as protocol fidelity, absence of race conditions or deadlocks. We design and implement a protocol specification language based on dependent multiparty session types. The language is equipped with a ...
متن کاملSubtyping Supports Safe Session Substitution
Session types describe the structure of bi-directional pointto-point communication channels by specifying the sequence and format of messages on each channel. A session type defines a communication protocol. Type systems that include session types are able to statically verify that communication-based code generates, and responds to, messages according to a specified protocol. It is natural to ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2015